class InfoNotFoundError extends Error {
    constructor(message: string) {
        super(message); // 调用父类 Error 的构造函数
        this.name = "InfoNotFoundError"; // 设置错误名称
        Object.setPrototypeOf(this, InfoNotFoundError.prototype); // 修复原型链
    }
}

class TitleNotFoundError extends InfoNotFoundError {
    constructor(message: string) {
        super(message); // 调用父类 Error 的构造函数
        this.name = "TitleNotFoundError"; // 设置错误名称
        Object.setPrototypeOf(this, TitleNotFoundError.prototype); // 修复原型链
    }
}

class AnswerNotFoundError extends InfoNotFoundError {
    constructor(message: string) {
        super(message); // 调用父类 Error 的构造函数
        this.name = "AnswerNotFoundError"; // 设置错误名称
        Object.setPrototypeOf(this, AnswerNotFoundError.prototype); // 修复原型链
    }
}

export {TitleNotFoundError, AnswerNotFoundError, InfoNotFoundError};